<template>
	<view class="container min100">
		<!-- <view class="center mt-100 size-30">暂无新的联系人请求</view> -->
		<view class="applybox">
			<view class="applyItem plr-20 ptb-20 flex flex-start" v-for="item in applyFriend" @click="friendDetail(item)">
				<view class="" style="20%">
					<image :src=" 'http://im.ezongguan.com/static/photo/'+item.photo " mode=""></image>
				</view>
				<view class="flex itemcont">
					<view class="ml-20 ">
						<view class="black">{{item.nickname}}</view>
						<view class="size-24 gray">{{item.content}}</view>
					</view>
					<view class="check size-24 plr-20 ptb-10" >
						{{item.text}}
					</view>
				</view>
				
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				keyword: '',
				applyFriend:[]
			}
		},
		onShow() {
			this.init()
		},
		methods: {
			friendDetail(item){
				console.log(item)
				uni.navigateTo({
					url:'./friendDetail?user_id='+item.user_id +'&id='+ item.id + '&content=' + item.content
				})
			},
			init(){
				var params ={
					_token:uni.getStorageSync('im_token'),
					_agent_id:1
				}
				uni.request({
					url: `  http://im.ezongguan.com/im/get/applyFriend`,
					method: 'POST',
					data: params,
					success: (res) => {
						console.log(res.data)
						this.applyFriend=res.data.data
					},
				})
			}
		},
		
	}
</script>

<style lang="less" scoped>
.container{
	width: 100%;
	background-color: rgb(246, 246, 246);
	.applybox{
		background-color: #fff;
		.applyItem{
			border-bottom: 1rpx solid #F5F5F5;
			.itemcont{
				width: 100%;
			}
			.check{
				background-color: rgb(237, 238, 239);
				border-radius: 10rpx;
			}
			image{
				width: 80rpx;
				height: 80rpx;
				border-radius: 10%;
			}
		}
	}
}
</style>
